﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Photography
{
    public partial class Portfolio : System.Web.UI.Page
    {
        protected new Photography.SiteMaster Master { get { return base.Master as Photography.SiteMaster; } }
        public int? GalleryId { get { return string.IsNullOrEmpty(Request["gal"]) ? (int?)null : int.Parse(Request["gal"]); } }

        protected void Page_Load(object sender, EventArgs e)
        {
        }

        protected void GetGalleryPhotos(object sender, LinqDataSourceSelectEventArgs e)
        {
            if (GalleryId.HasValue)
            {
                Photography.App_Data.PhotographyDataContext context = new Photography.App_Data.PhotographyDataContext();
                e.Result = context.GetGalleryPhotos(GalleryId);
            }
        }

    }
}
